package com.example.demo.service;

import com.example.demo.model.Book;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.util.List;
import java.util.Map;

/**
 * 功能描述：
 *
 * @Author: Zhanghf
 * @Date: 2021/12/14 16:18
 */
@Component
@FeignClient(value = "NOVEL-USER-SERVICE")
public interface UserFeignService {
    @PostMapping(value = "/checking")
    public boolean checklogin(@RequestParam("name")String name,@RequestParam("password") String password );

    @GetMapping(value = "/updatehistory")
     public String updatehistory(@RequestParam("userid")Integer userid, @RequestParam("bookid")  Integer bookid, @RequestParam("chapterid")  Integer chapterid);

    @GetMapping(value = "/deletehistory")
    public String deletehistory(@RequestParam("userid")Integer userid, @RequestParam("bookid")  Integer bookid, @RequestParam("chapterid")  Integer chapterid);

//    @GetMapping("/Content_based")
//    public List<Book> Content_based(Integer userid);
//
//    @GetMapping("/jkd_rec")
//    public List<Map.Entry<Integer, Double>> jkd_rec(Integer recUserid);
//
//    @GetMapping("/pearson_rec")
//    public List<Map.Entry<Integer, Double>> pearson_rec(@RequestParam("recUserid")Integer recUserid);

}
